
Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Web
Imports System.Web.SessionState
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Imports _2bMatesSite.BO
Imports _2bMatesSite.Common

Namespace _2bMatesSite
	''' <summary>
	''' Summary description for contact_2bmates.
	''' </summary>
	Public Partial Class contact_2bmates
		Inherits BaseWebPage

		Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
			' Put user code to initialize the page here
			' this.pageTemplate.PageTitle = PageTitles.CONTACT_2BMATES_PAGE;

			' init page from XML
			Me.initPageTitles(Constants.CONTACT_2BMATES, "", Form1, Nothing, Nothing)
			Me.initAdvertisements(Form1, Nothing)

			If Not Me.IsPostBack Then
				If Request.Params(Constants.SUBJECT_PARAM) <> Nothing Then
					txtSubject.Text = Request.Params(Constants.SUBJECT_PARAM)
				End If
			End If
		End Sub

		#region Web Form Designer generated code
		Protected Overloads Overrides Sub OnInit(ByVal e As EventArgs)
			'
			' CODEGEN: This call is required by the ASP.NET Web Form Designer.
			'
			InitializeComponent()
			MyBase.OnInit(e)
		End Sub

		''' <summary>
		''' Required method for Designer support - do not modify
		''' the contents of this method with the code editor.
		''' </summary>
		Private Sub InitializeComponent()

		End Sub
#End Region

		Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs)
			If Page.IsValid Then
				Try
					Utils.SendMail(txtEmail.Text.Trim(), Constants.CONTACT_US_EMAIL, txtSubject.Text.Trim(), txtBody.Text.Trim())
					lblResultMessage.Visible = True
				Catch ex As Exception
					lblSendEmailErrorMessage.Text = "The following error occured during sending an email: " + ex.Message
					lblSendEmailErrorMessage.Visible = True
				End Try
			End If
		End Sub

		====================
        ' This public property was added by conversion wizard to allow the access of a protected, autogenerated member variable Form1.
		====================
        Public ReadOnly Property Form1() As System.Web.UI.HtmlControls.HtmlForm
            Get
                Return Migrated_Form1
            End Get
        End Property
        'set { Migrated_Form1 = value; }
    End Class
End Namespace






